import java.util.Date;

/**
 * @Author: Lenovo
 * @Date: 2024/6/8 11:08
 * @description:
 */
public class TestDate {
    public static void main(String[] args) {
        long nowNum=System.currentTimeMillis();
        System.out.println(nowNum);
        Date date1=new Date(10000020323L);
        Date date2=new Date();
        System.out.println(date1);
        System.out.println(date1.getTime());
        System.out.println(date2);
        System.out.println(date2.getTime());

        Date date3=new Date(-21L*365*24*3600*1000);//1949 年
        System.out.println(date3);
        System.out.println(date3.equals(date1));
        System.out.println(date3.before(date1));
        System.out.println(date3.after(date1));
    }
}
